package com.tensquare.article.controller;

import com.tensquare.article.service.ArticleService;
import entity.Result;
import entity.StatusCode;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("article")
@CrossOrigin
public class ArticleController {
    @Autowired
    public ArticleService articleService;
    //文章审核
    @PutMapping("examine/{articleId}")
    public Result examine(@PathVariable String articleId){
        articleService.examine(articleId);
        return new Result(true,StatusCode.OK,"审核通过");
    }

    //文章点赞
    @PutMapping("thumbup/{articleId}")
    public Result updateThumpup(@PathVariable String articleId){
        articleService.updateThumpup(articleId);
        return new Result(true,StatusCode.OK,"文章点赞成功");
    }
    //修改文章
}
